package top.hmtools.makedata.random;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

/**
 * 随机生成输入流
 * @author HyboWork
 *
 */
public class RandomInputStream implements IRandom<InputStream> {
	
	private RandomBytes randomBytes;
	
	public RandomInputStream() {
		this.randomBytes = new RandomBytes();
	}

	@Override
	public InputStream getRandom() {
		return this.getRandom(this.randomBytes.getRandom());
	}
	
	public InputStream getRandom(byte[] bytes) {
		ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes);
		return inputStream;
	}
	

}
